.class public Lcom/estrongs/android/pop/app/log/adapter/LogAdapter;
.super Lcom/estrongs/android/biz/cards/cardfactory/CmsCardBaseAdapter;
.source "LogAdapter.java"


# annotations
.annotation system Ldalvik/annotation/Signature;
    value = {
        "Lcom/estrongs/android/biz/cards/cardfactory/CmsCardBaseAdapter<",
        "Lcom/estrongs/android/pop/app/log/d;",
        ">;"
    }
.end annotation


# instance fields
.field private k:Ljava/util/List;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/List<",
            "Lcom/estrongs/android/pop/app/log/d;",
            ">;"
        }
    .end annotation
.end field

.field private l:Landroid/content/Context;

.field private m:Z

.field private n:Z

.field private o:Landroidx/recyclerview/widget/RecyclerView$Adapter;

.field private p:Ljava/util/Map;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/Map<",
            "Ljava/lang/Integer;",
            "Landroidx/recyclerview/widget/RecyclerView$ViewHolder;",
            ">;"
        }
    .end annotation
.end field

.field private q:Ljava/util/Map;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/Map<",
            "Ljava/lang/Integer;",
            "Ljava/lang/Boolean;",
            ">;"
        }
    .end annotation
.end field


# direct methods
.method public constructor <init>(Landroid/content/Context;)V
    .locals 0

    .line 1
    invoke-direct {p0, p1}, Lcom/estrongs/android/biz/cards/cardfactory/CmsCardBaseAdapter;-><init>(Landroid/content/Context;)V

    .line 2
    iput-object p1, p0, Lcom/estrongs/android/pop/app/log/adapter/LogAdapter;->l:Landroid/content/Context;

    .line 3
    new-instance p1, Ljava/util/ArrayList;

    invoke-direct {p1}, Ljava/util/ArrayList;-><init>()V

    iput-object p1, p0, Lcom/estrongs/android/pop/app/log/adapter/LogAdapter;->k:Ljava/util/List;

    const/4 p1, 0x1

    .line 4
    iput-boolean p1, p0, Lcom/estrongs/android/pop/app/log/adapter/LogAdapter;->m:Z

    const/4 p1, 0x0

    .line 5
    iput-boolean p1, p0, Lcom/estrongs/android/pop/app/log/adapter/LogAdapter;->n:Z

    .line 6
    new-instance p1, Ljava/util/HashMap;

    invoke-direct {p1}, Ljava/util/HashMap;-><init>()V

    iput-object p1, p0, Lcom/estrongs/android/pop/app/log/adapter/LogAdapter;->p:Ljava/util/Map;

    .line 7
    new-instance p1, Ljava/util/HashMap;

    invoke-direct {p1}, Ljava/util/HashMap;-><init>()V

    iput-object p1, p0, Lcom/estrongs/android/pop/app/log/adapter/LogAdapter;->q:Ljava/util/Map;

    return-void
.end method


# virtual methods
.method public a(Landroid/view/View;Ljava/lang/String;)Landroidx/recyclerview/widget/RecyclerView$ViewHolder;
    .locals 1

    .line 2
    new-instance p2, Lcom/estrongs/android/pop/app/log/viewHolder/LogCmsCardViewHolder;

    iget-object v0, p0, Lcom/estrongs/android/pop/app/log/adapter/LogAdapter;->l:Landroid/content/Context;

    invoke-direct {p2, v0, p1}, Lcom/estrongs/android/pop/app/log/viewHolder/LogCmsCardViewHolder;-><init>(Landroid/content/Context;Landroid/view/View;)V

    return-object p2
.end method

.method public a(Landroidx/recyclerview/widget/RecyclerView$Adapter;)V
    .locals 0

    .line 1
    iput-object p1, p0, Lcom/estrongs/android/pop/app/log/adapter/LogAdapter;->o:Landroidx/recyclerview/widget/RecyclerView$Adapter;

    return-void
.end method

.method public a(Ljava/util/List;)V
    .locals 1
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/util/List<",
            "Lcom/estrongs/android/pop/app/log/d;",
            ">;)V"
        }
    .end annotation

    .line 3
    iget-object v0, p0, Lcom/estrongs/android/pop/app/log/adapter/LogAdapter;->k:Ljava/util/List;

    invoke-interface {v0}, Ljava/util/List;->clear()V

    .line 4
    iget-object v0, p0, Lcom/estrongs/android/pop/app/log/adapter/LogAdapter;->k:Ljava/util/List;

    invoke-interface {v0, p1}, Ljava/util/List;->addAll(Ljava/util/Collection;)Z

    return-void
.end method

.method public a(Z)V
    .locals 0

    .line 5
    iput-boolean p1, p0, Lcom/estrongs/android/pop/app/log/adapter/LogAdapter;->n:Z

    return-void
.end method

.method public d()Ljava/util/List;
    .locals 1
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "()",
            "Ljava/util/List<",
            "Lcom/estrongs/android/pop/app/log/d;",
            ">;"
        }
    .end annotation

    .line 1
    iget-object v0, p0, Lcom/estrongs/android/pop/app/log/adapter/LogAdapter;->k:Ljava/util/List;

    return-object v0
.end method

.method public getItemCount()I
    .locals 1

    .line 1
    iget-boolean v0, p0, Lcom/estrongs/android/pop/app/log/adapter/LogAdapter;->m:Z

    if-eqz v0, :cond_0

    invoke-virtual {p0}, Lcom/estrongs/android/biz/cards/cardfactory/CmsCardBaseAdapter;->g()I

    move-result v0

    if-eqz v0, :cond_0

    .line 2
    invoke-virtual {p0}, Lcom/estrongs/android/biz/cards/cardfactory/CmsCardBaseAdapter;->g()I

    move-result v0

    add-int/lit8 v0, v0, 0x1

    return v0

    .line 3
    :cond_0
    invoke-virtual {p0}, Lcom/estrongs/android/biz/cards/cardfactory/CmsCardBaseAdapter;->g()I

    move-result v0

    return v0
.end method

.method public getItemViewType(I)I
    .locals 2

    .line 1
    iget-boolean v0, p0, Lcom/estrongs/android/pop/app/log/adapter/LogAdapter;->m:Z

    if-eqz v0, :cond_0

    if-eqz p1, :cond_0

    invoke-virtual {p0}, Lcom/estrongs/android/pop/app/log/adapter/LogAdapter;->getItemCount()I

    move-result v0

    add-int/lit8 v0, v0, -0x1

    if-ne p1, v0, :cond_0

    const/16 p1, 0x64

    return p1

    .line 2
    :cond_0
    invoke-virtual {p0, p1}, Lcom/estrongs/android/biz/cards/cardfactory/CmsCardBaseAdapter;->d(I)I

    move-result v0

    const/16 v1, -0x3e8

    if-eq v0, v1, :cond_1

    return v0

    .line 3
    :cond_1
    invoke-virtual {p0, p1}, Lcom/estrongs/android/biz/cards/cardfactory/CmsCardBaseAdapter;->e(I)Ljava/lang/Object;

    move-result-object p1

    if-nez p1, :cond_2

    const/4 p1, 0x0

    return p1

    .line 4
    :cond_2
    check-cast p1, Lcom/estrongs/android/pop/app/log/d;

    .line 5
    iget p1, p1, Lcom/estrongs/android/pop/app/log/d;->c:I

    return p1
.end method

.method public h()V
    .locals 2

    .line 1
    iget-object v0, p0, Lcom/estrongs/android/pop/app/log/adapter/LogAdapter;->o:Landroidx/recyclerview/widget/RecyclerView$Adapter;

    if-eqz v0, :cond_1

    .line 2
    instance-of v1, v0, Lcom/estrongs/android/ui/homepage/HomeAdapter;

    if-eqz v1, :cond_0

    .line 3
    check-cast v0, Lcom/estrongs/android/ui/homepage/HomeAdapter;

    const/4 v1, -0x1

    invoke-virtual {v0, v1}, Lcom/estrongs/android/ui/homepage/HomeAdapter;->d(I)V

    goto :goto_0

    .line 4
    :cond_0
    invoke-virtual {v0}, Landroidx/recyclerview/widget/RecyclerView$Adapter;->notifyDataSetChanged()V

    :cond_1
    :goto_0
    return-void
.end method

.method public k()Z
    .locals 2

    .line 1
    iget-object v0, p0, Lcom/estrongs/android/biz/cards/cardfactory/CmsCardBaseAdapter;->e:Ljava/util/List;

    invoke-interface {v0}, Ljava/util/List;->size()I

    move-result v0

    const/4 v1, 0x0

    if-nez v0, :cond_0

    return v1

    .line 2
    :cond_0
    iget-object v0, p0, Lcom/estrongs/android/biz/cards/cardfactory/CmsCardBaseAdapter;->e:Ljava/util/List;

    invoke-interface {v0, v1}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v0

    .line 3
    instance-of v0, v0, Les/wg;

    return v0
.end method

.method public onBindViewHolder(Landroidx/recyclerview/widget/RecyclerView$ViewHolder;I)V
    .locals 3

    if-nez p1, :cond_0

    return-void

    .line 1
    :cond_0
    iget-object v0, p0, Lcom/estrongs/android/pop/app/log/adapter/LogAdapter;->p:Ljava/util/Map;

    invoke-virtual {p0, p2}, Lcom/estrongs/android/pop/app/log/adapter/LogAdapter;->getItemViewType(I)I

    move-result v1

    invoke-static {v1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v1

    invoke-interface {v0, v1}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v0

    if-eqz v0, :cond_2

    .line 2
    iget-object v0, p0, Lcom/estrongs/android/pop/app/log/adapter/LogAdapter;->q:Ljava/util/Map;

    invoke-static {p2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v1

    invoke-interface {v0, v1}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Ljava/lang/Boolean;

    if-eqz v0, :cond_1

    .line 3
    invoke-virtual {v0}, Ljava/lang/Boolean;->booleanValue()Z

    move-result v0

    if-eqz v0, :cond_1

    return-void

    .line 4
    :cond_1
    invoke-virtual {p0, p1, p2}, Lcom/estrongs/android/biz/cards/cardfactory/CmsCardBaseAdapter;->a(Landroidx/recyclerview/widget/RecyclerView$ViewHolder;I)Z

    move-result v0

    invoke-static {v0}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;

    move-result-object v0

    .line 5
    invoke-virtual {v0}, Ljava/lang/Boolean;->booleanValue()Z

    move-result v0

    if-eqz v0, :cond_2

    .line 6
    iget-object p1, p0, Lcom/estrongs/android/pop/app/log/adapter/LogAdapter;->q:Ljava/util/Map;

    invoke-static {p2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object p2

    const/4 v0, 0x1

    invoke-static {v0}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;

    move-result-object v0

    invoke-interface {p1, p2, v0}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    return-void

    .line 7
    :cond_2
    instance-of v0, p1, Lcom/estrongs/android/pop/app/log/viewHolder/LogFooterViewHolder;

    if-eqz v0, :cond_3

    .line 8
    check-cast p1, Lcom/estrongs/android/pop/app/log/viewHolder/LogViewHolder;

    iget-boolean p2, p0, Lcom/estrongs/android/pop/app/log/adapter/LogAdapter;->n:Z

    invoke-static {p2}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;

    move-result-object p2

    invoke-virtual {p1, p2}, Lcom/estrongs/android/pop/app/log/viewHolder/LogViewHolder;->a(Ljava/lang/Object;)V

    goto :goto_1

    .line 9
    :cond_3
    invoke-virtual {p0, p2}, Lcom/estrongs/android/biz/cards/cardfactory/CmsCardBaseAdapter;->e(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/estrongs/android/pop/app/log/d;

    if-eqz v0, :cond_5

    const/4 v1, 0x0

    .line 10
    iput-boolean v1, v0, Lcom/estrongs/android/pop/app/log/d;->h:Z

    .line 11
    :try_start_0
    move-object v2, p1

    check-cast v2, Lcom/estrongs/android/pop/app/log/viewHolder/LogMediaBaseViewHolder;

    iget-object v2, v2, Lcom/estrongs/android/pop/app/log/viewHolder/LogMediaBaseViewHolder;->b:Landroid/widget/LinearLayout;

    if-nez p2, :cond_4

    const/16 v1, 0x8

    .line 12
    :cond_4
    invoke-virtual {v2, v1}, Landroid/widget/LinearLayout;->setVisibility(I)V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_0

    :catch_0
    move-exception p2

    .line 13
    invoke-virtual {p2}, Ljava/lang/Exception;->printStackTrace()V

    .line 14
    :goto_0
    check-cast p1, Lcom/estrongs/android/pop/app/log/viewHolder/LogViewHolder;

    invoke-virtual {p1, v0}, Lcom/estrongs/android/pop/app/log/viewHolder/LogViewHolder;->a(Ljava/lang/Object;)V

    :cond_5
    :goto_1
    return-void
.end method

.method public onCreateViewHolder(Landroid/view/ViewGroup;I)Landroidx/recyclerview/widget/RecyclerView$ViewHolder;
    .locals 2

    .line 1
    invoke-static {}, Lcom/estrongs/android/biz/cards/cardfactory/h;->b()Lcom/estrongs/android/biz/cards/cardfactory/h;

    move-result-object v0

    invoke-virtual {v0, p2}, Lcom/estrongs/android/biz/cards/cardfactory/h;->a(I)Ljava/lang/String;

    move-result-object v0

    if-eqz v0, :cond_1

    .line 2
    iget-object v0, p0, Lcom/estrongs/android/pop/app/log/adapter/LogAdapter;->p:Ljava/util/Map;

    invoke-static {p2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v1

    invoke-interface {v0, v1}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Landroidx/recyclerview/widget/RecyclerView$ViewHolder;

    if-eqz v0, :cond_0

    return-object v0

    .line 3
    :cond_0
    invoke-virtual {p0, p1, p2}, Lcom/estrongs/android/biz/cards/cardfactory/CmsCardBaseAdapter;->a(Landroid/view/ViewGroup;I)Landroidx/recyclerview/widget/RecyclerView$ViewHolder;

    move-result-object p1

    if-eqz p1, :cond_1

    .line 4
    iget-object v0, p0, Lcom/estrongs/android/pop/app/log/adapter/LogAdapter;->p:Ljava/util/Map;

    invoke-static {p2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object p2

    invoke-interface {v0, p2, p1}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    return-object p1

    :cond_1
    const/4 p1, 0x1

    if-eq p2, p1, :cond_4

    const/4 p1, 0x2

    if-eq p2, p1, :cond_3

    const/4 p1, 0x3

    if-eq p2, p1, :cond_4

    const/4 p1, 0x4

    if-eq p2, p1, :cond_3

    const/4 p1, 0x6

    if-eq p2, p1, :cond_3

    const/16 p1, 0x64

    if-eq p2, p1, :cond_2

    packed-switch p2, :pswitch_data_0

    .line 5
    new-instance p1, Lcom/estrongs/android/pop/app/log/viewHolder/LogApkViewHolder;

    iget-object p2, p0, Lcom/estrongs/android/pop/app/log/adapter/LogAdapter;->l:Landroid/content/Context;

    invoke-direct {p1, p2}, Lcom/estrongs/android/pop/app/log/viewHolder/LogApkViewHolder;-><init>(Landroid/content/Context;)V

    goto :goto_0

    .line 6
    :pswitch_0
    new-instance p1, Lcom/estrongs/android/pop/app/log/viewHolder/LogNetDiskHolder;

    iget-object p2, p0, Lcom/estrongs/android/pop/app/log/adapter/LogAdapter;->l:Landroid/content/Context;

    invoke-direct {p1, p2}, Lcom/estrongs/android/pop/app/log/viewHolder/LogNetDiskHolder;-><init>(Landroid/content/Context;)V

    goto :goto_0

    .line 7
    :cond_2
    new-instance p1, Lcom/estrongs/android/pop/app/log/viewHolder/LogFooterViewHolder;

    iget-object p2, p0, Lcom/estrongs/android/pop/app/log/adapter/LogAdapter;->l:Landroid/content/Context;

    invoke-direct {p1, p2}, Lcom/estrongs/android/pop/app/log/viewHolder/LogFooterViewHolder;-><init>(Landroid/content/Context;)V

    goto :goto_0

    .line 8
    :cond_3
    :pswitch_1
    new-instance p1, Lcom/estrongs/android/pop/app/log/viewHolder/LogApkViewHolder;

    iget-object p2, p0, Lcom/estrongs/android/pop/app/log/adapter/LogAdapter;->l:Landroid/content/Context;

    invoke-direct {p1, p2}, Lcom/estrongs/android/pop/app/log/viewHolder/LogApkViewHolder;-><init>(Landroid/content/Context;)V

    goto :goto_0

    .line 9
    :cond_4
    invoke-static {}, Les/rj;->d()Z

    move-result p1

    if-eqz p1, :cond_5

    .line 10
    new-instance p1, Lcom/estrongs/android/pop/app/log/viewHolder/LogImgViewHolder;

    iget-object p2, p0, Lcom/estrongs/android/pop/app/log/adapter/LogAdapter;->l:Landroid/content/Context;

    invoke-direct {p1, p2}, Lcom/estrongs/android/pop/app/log/viewHolder/LogImgViewHolder;-><init>(Landroid/content/Context;)V

    goto :goto_0

    .line 11
    :cond_5
    new-instance p1, Lcom/estrongs/android/pop/app/log/viewHolder/LogApkViewHolder;

    iget-object p2, p0, Lcom/estrongs/android/pop/app/log/adapter/LogAdapter;->l:Landroid/content/Context;

    invoke-direct {p1, p2}, Lcom/estrongs/android/pop/app/log/viewHolder/LogApkViewHolder;-><init>(Landroid/content/Context;)V

    :goto_0
    return-object p1

    nop

    :pswitch_data_0
    .packed-switch 0x32
        :pswitch_1
        :pswitch_0
        :pswitch_0
    .end packed-switch
.end method
